package com.ggh.vo;

import com.ggh.util.JsonUtils;

/**
 * @author ： jj
 * @date ：2019/10/14 21:50
 * @description : 和客户端传输协议
 */
public class UserToken {
	/**
	 *传输id
	 */
	public int userid;
	/**
	 * 传输头
	 */
	public String type;
	/**
	 * 传输消息体
	 */
	public Object messages;
	/**
	 * 传输状态
	 */
	private int stuts;

	public UserToken(int userid,String type, Object messages,int stuts) {
		this.userid = userid;
		this.type=type;
		this.messages=messages;
		this.stuts=stuts;
	}


	public static UserToken newInstance( int userid,String type, Object messages,int stuts) {
		return new UserToken(userid,type,JsonUtils.get().toJson(messages),stuts);
	}

}
